package com.lx.bean;

import java.sql.Timestamp;
import java.util.Objects;

/**
 * @ClassName: User
 * @Description:
 * @Date Created in  2021-07-09 18:18
 * @Modified By:
 * @Author: 零巽
 */
public class Courier {
    private int id;
    private String userName;
    private String phone;
    private String idNumber;
    private String password;
    private int sendNumber;
    private Timestamp registerTime;
    private Timestamp loginTime;

    public Courier(int id, String userName, String phone, String idNumber, String password, int sendNumber, Timestamp registerTime, Timestamp loginTime) {
        this.id = id;
        this.userName = userName;
        this.phone = phone;
        this.idNumber = idNumber;
        this.password = password;
        this.sendNumber = sendNumber;
        this.registerTime = registerTime;
        this.loginTime = loginTime;
    }

    public int getSendNumber() {
        return sendNumber;
    }

    public void setSendNumber(int sendNumber) {
        this.sendNumber = sendNumber;
    }

    public Courier(String userName, String phone, String idNumber, String password) {
        this.userName = userName;
        this.phone = phone;
        this.idNumber = idNumber;
        this.password = password;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Courier user = (Courier) o;
        return id == user.id && Objects.equals(userName, user.userName) && Objects.equals(phone, user.phone) && Objects.equals(idNumber, user.idNumber) && Objects.equals(password, user.password) && Objects.equals(registerTime, user.registerTime) && Objects.equals(loginTime, user.loginTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, userName, phone, idNumber, password, registerTime, loginTime);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getIdNumber() {
        return idNumber;
    }

    public void setIdNumber(String idNumber) {
        this.idNumber = idNumber;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Timestamp getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(Timestamp registerTime) {
        this.registerTime = registerTime;
    }

    public Timestamp getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Timestamp loginTime) {
        this.loginTime = loginTime;
    }

    public Courier(int id, String userName, String phone, String idNumber, String password, Timestamp registerTime, Timestamp loginTime) {
        this.id = id;
        this.userName = userName;
        this.phone = phone;
        this.idNumber = idNumber;
        this.password = password;
        this.registerTime = registerTime;
        this.loginTime = loginTime;
    }

    public Courier() {
    }
}
